package com.jyw.business.obstacles.domain.vo.web;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.jyw.common.annotation.Conversion;
import com.jyw.common.constant.SysDictTypeConstant;
import com.jyw.common.enums.ConversionType;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.FieldNameConstants;

import java.time.LocalDateTime;

/**
 * @author Created by ZhangCheng on 2024/01/18
 */
@Data
@ApiModel("服务台科室报修历史工单返回VO")
@FieldNameConstants
public class OrderDeptRepairPageVO {

    @ApiModelProperty("ID")
    private Long id;

    @ApiModelProperty("工单号")
    private String orderNum;

    @ApiModelProperty("主工单号")
    private String parentOrderNum;

    @ApiModelProperty("故障描述")
    private String faultRemark;

    @ApiModelProperty("工单状态")
    @Conversion(value = ConversionType.DICT, dictType = SysDictTypeConstant.OBS_FAULT_STATE)
    private String currState;

    @ApiModelProperty("工单状态标签")
    private String currStateToName;

    @ApiModelProperty("报修科室")
    @Conversion(value = ConversionType.DEPT, name = MineOrderPageVO.Fields.deptName)
    private Long deptId;

    @ApiModelProperty("报修科室名称")
    private String deptName;

    @ApiModelProperty("故障分类")
    @Conversion(value = ConversionType.DICT, dictType = SysDictTypeConstant.OBS_FAULT_TYPE)
    private String faultType;

    @ApiModelProperty("故障分类标签")
    private String faultTypeToName;

    @ApiModelProperty("报修电话")
    private String phone;

    @ApiModelProperty("报修时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:dd")
    private LocalDateTime createTime;


    @ApiModelProperty("建单人")
    @Conversion(value = ConversionType.USER, name = Fields.createUserToName)
    private Long createUser;

    @ApiModelProperty("建单人名称")
    private String createUserToName;

    @ApiModelProperty("报障来源")
    @Conversion(value = ConversionType.DICT, dictType = SysDictTypeConstant.OBS_FAULT_SOURCE)
    private Integer source;

    @ApiModelProperty("报障来源标签")
    private String sourceToName;

    /** 影响范围 */
    @ApiModelProperty("影响范围")
    @Conversion(value = ConversionType.DICT,dictType = SysDictTypeConstant.OBS_FAULT_RANGE)
    private Integer rangeType;

    @ApiModelProperty("影响范围标签")
    private String rangeTypeToName;

    @ApiModelProperty("处理人")
    @Conversion(value = ConversionType.USER, name = Fields.makeUserName)
    private Long makeUser;

    @ApiModelProperty("处理人名称")
    private String makeUserName;

}
